#ifndef alvopp_hh__included__
#define alvopp_hh__included__

#include <iostream>
//~ #include <list>
#include "../../alvo.hh"

template <typename E>
class Back {
public:
	E*bk;
	E&fw;
	Back (E*abk, E&afw):bk(abk),fw(afw){}
};

template <typename E>
class Link {
public:
	E*bk;
	Link<E> *fw;
	Link(E*abk, Link<E> *afw):bk(abk),fw(afw){}
};

template <typename T>
class DUMMYstack {
	A_LIST *ml;
public:
	DUMMYstack (A_LIST *al);
public:
	void push_back();
	T back();
	void pop_back();
};
/*
ostream &
operator<<(ostream &stream, A_CONT_TAG *aCont) {
		vector<A_CONT_TAG*>::iterator sii=stream.begin(), sie=stream.end();
		while (sii!=sie) {
			cout << *sii << endl;
			++sii;
		}
	//stream << items;
	stream << endl;
	return stream;
}
*/
class AlvoPP {
	//void*top; //ALVO*
	//Back<ALVO> *back;
	vector<A_CONT_TAG*> stack;
	//~ DUMMYstack stack;
	A_CONT_TAG *cur;
	ALVO_C C;
	ALVO_X X;
	char nn[256];//,*pnn;
public:
	void *Result;
	A_LIST s;
public:
	void print() {
		vector<A_CONT_TAG*>::iterator sii=stack.begin(), sie=stack.end();
		while (sii!=sie) {
			cout << *sii << endl;
			++sii;
		}
	}
public:
	AlvoPP();
	//
virtual ~AlvoPP() {print();}
	//
	void sg(); void sl(); void sz(); 
	void eg(); void el(); void ez(); 
	void symbol();
	void numeric();
	void eval();
	void stringular();
};

#endif // alvopp_hh__included__
